package com.dinzeer.resonantisshelomoh.se;

import com.dinzeer.legendreliclib.lib.util.slashblade.AbstractSpecialEffect;
import mods.flammpfeil.slashblade.event.SlashBladeEvent;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.LivingEntity;

public class OccupyingHeart extends AbstractSpecialEffect {
    public OccupyingHeart() {
        super(17);
    }

    @Override
    public void handleHitEntity(SlashBladeEvent.HitEvent event, LivingEntity attacker) {
        super.handleHitEntity(event, attacker);
        event.getTarget().addEffect(new MobEffectInstance(MobEffects.DARKNESS, 10, 3));
        event.getTarget().addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, 20, 1));
    }

    @Override
    public void handleUpdate(SlashBladeEvent.UpdateEvent event, LivingEntity attacker) {
        super.handleUpdate(event, attacker);
        attacker.addEffect(new MobEffectInstance(MobEffects.DAMAGE_BOOST, 300, 2));
        attacker.addEffect(new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 300, 2));

    }
}
